#ifndef MGD_CAR_OBJECT_H
#define MGD_CAR_OBJECT_H

#include "mbase_object.h"
#include "socket_item.h"
#include "plug_item.h"
#include <QPainter>

class mGD_car_object : public MBaseObject
{
public:

    enum {Type = UserType + 3};
    int type() const override { return Type; }

    explicit mGD_car_object(mGD_car_object *parent = nullptr);
    ~mGD_car_object() Q_DECL_OVERRIDE;

    QRectF boundingRect() const Q_DECL_OVERRIDE;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
    MBaseObject::OBJTYPE objType() const  Q_DECL_OVERRIDE { return GD_car; }

    PlugObject* getplugBleft() const {return plugBackLeft;}
    PlugObject* getplugBright() const {return plugBackRight;}
    PlugObject* getplugFright() const {return plugFrontRight;}
    SocketObject* getsocketFLeft() const {return socketFrontLeft;}
    SocketObject* getsocketMLeft() const {return socketMiddleLeft;}
    SocketObject* getsocketMright() const {return socketMiddleRight;}

private:
    PlugObject *plugFrontRight;
    PlugObject *plugBackLeft;
    PlugObject *plugBackRight;
    SocketObject *socketFrontLeft;
    SocketObject *socketMiddleLeft;
    SocketObject *socketMiddleRight;
};

#endif // MGD_CAR_OBJECT_H
